-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: auto chart bumps for development branches #152
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nicholasSUSE
force-pushed
the
auto-chart-bump
branch
from
November 5, 2024 01:57
78afe43
to
6c2ad0a
Compare
2 types accepted: - <package> - <chart>/<version>/<package>
- InitDependencies handle the version rules and the lifecycle rules that will be needed to calculate the next version - GetPackages is used for "make prepare, patch and charts"
nicholasSUSE
changed the title
small refactor at main.go
Feature: auto chart bumps for development branches
Nov 5, 2024
briandowns
approved these changes
Nov 5, 2024
Adding new fields: - Auto (bool type) will come from the new package.yaml - AutoGeneratedBumpVersion that will be calculated at the end of the process Also Fixed GetGithubRepository branch variable which was not being used
nicholasSUSE
force-pushed
the
auto-chart-bump
branch
from
November 5, 2024 02:25
b5b6aec
to
5b3b386
Compare
This method will enforce that the package.yaml for an auto-chart-bump is following the standards. The standards will be defined at the rancher/charts/wiki. They were already discussed with the chart owner (rancher-cis-operator). They will serve as a standard for all other chart owners that desire to adopt the feature
Adding checks for the upstream chart options. This means the variables that are used to check the upstream chart repository. Where the update will come from.
Adding checks for the upstream additional charts that problably will be CRDs. On this part of the code there will probably exist needed modifications for new chart owners. That will need to be evaluated in the future.
nicholasSUSE
force-pushed
the
auto-chart-bump
branch
from
November 5, 2024 02:41
54aba72
to
f4a9ab3
Compare
Adding documentation Adding re-use of the general methods that are already used in the release process.
This is the most important feature. - The loading of versions must check/parse the latest version(from the index.yaml), - The loading of versions must check/parse the upstream version to release, - the rules for version bumps must be applied: (Only +1 minor/patch bump per PR). Build the AutoGeneratedBumpVersion at the end of the process
The latest version comes from the actual index.yaml which was already sorted. The assetsVersionsMap was loaded from lifecycle.InitDependencies
parse/separate the latest version that might come in one of the following formats: - 10X.Y.Z+upa.b.c - a.b.c
- get the version to release from the upstream repository - check if it is coming with a repo prefix version (it should never come with it) - check if the version to release is newer or the same as the latest version - if it is the same it is an rc bump and it is ok
small modification without breaking changes at generally used function for pulling upstream repository
rules: - If chart version bump was patch -> repoPrefixVersion bumps patch - If chart version bump was Minor Or Major -> repoPrefixVersion bumps minor The only major bump on repoPrefixVersion is when we have minor version bump of Rancher: - Rancher v2.9 - 104 - Rancher v2.10 - 105
adding the update to the release.yaml file
…nerated in the previous commits
- adding support for autoGenBumpVersion - not breaking any previous behavior
separating the version parsing and adding override for autoGenBumpVersion
- no changes here, just refactor
These fields were already present but not being used.
…stead of the legacy one
nicholasSUSE
force-pushed
the
auto-chart-bump
branch
from
November 5, 2024 04:08
c184297
to
7c885dd
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue: rancher/ecm-distro-tools#500
Summary
This PR will add the feature for automatic chart bumps on the development branch for any chart owner who wants the feature.
The first chart owner to implement it will be the
rancher-cis-benchmark
chart from the security/infracloud team.This is the auto-generated bump commit: rancher/charts@06f4ea5#diff-e64e27a7f6d146814115856a7f4fd6126aa07cff77caffdd0772d4612dac0a4b
These are the necessary changes to the package.yaml of the respective chart:
Roadmap
This is the first part of a final solution:
Before proceeding with the 2nd part, the auto-chart-bump will be manually executed and inspected for bumps.
Rules
The versioning rules are enforced in every auto-bump, it is defined here:
versioning charts
The wiki for this feature can be found here: